package com.huizu.project.service.impl;

import java.util.List;
import com.huizu.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.huizu.project.mapper.ProConfigRichMapper;
import com.huizu.project.domain.ProConfigRich;
import com.huizu.project.service.IProConfigRichService;

/**
 * 通用协议配置Service业务层处理
 * 
 * @author zhangmx
 * @date 2024-06-05
 */
@Service
public class ProConfigRichServiceImpl implements IProConfigRichService 
{
    @Autowired
    private ProConfigRichMapper proConfigRichMapper;

    /**
     * 查询通用协议配置
     * 
     * @param configurationId 通用协议配置主键
     * @return 通用协议配置
     */
    @Override
    public ProConfigRich selectProConfigRichByConfigurationId(String configurationId)
    {
        return proConfigRichMapper.selectProConfigRichByConfigurationId(configurationId);
    }

    /**
     * 查询通用协议配置列表
     * 
     * @param proConfigRich 通用协议配置
     * @return 通用协议配置
     */
    @Override
    public List<ProConfigRich> selectProConfigRichList(ProConfigRich proConfigRich)
    {
        return proConfigRichMapper.selectProConfigRichList(proConfigRich);
    }

    /**
     * 新增通用协议配置
     * 
     * @param proConfigRich 通用协议配置
     * @return 结果
     */
    @Override
    public int insertProConfigRich(ProConfigRich proConfigRich)
    {
        proConfigRich.setCreateTime(DateUtils.getNowDate());
        return proConfigRichMapper.insertProConfigRich(proConfigRich);
    }

    /**
     * 修改通用协议配置
     * 
     * @param proConfigRich 通用协议配置
     * @return 结果
     */
    @Override
    public int updateProConfigRich(ProConfigRich proConfigRich)
    {
        return proConfigRichMapper.updateProConfigRich(proConfigRich);
    }

    /**
     * 批量删除通用协议配置
     * 
     * @param configurationIds 需要删除的通用协议配置主键
     * @return 结果
     */
    @Override
    public int deleteProConfigRichByConfigurationIds(String[] configurationIds)
    {
        return proConfigRichMapper.deleteProConfigRichByConfigurationIds(configurationIds);
    }

    /**
     * 删除通用协议配置信息
     * 
     * @param configurationId 通用协议配置主键
     * @return 结果
     */
    @Override
    public int deleteProConfigRichByConfigurationId(String configurationId)
    {
        return proConfigRichMapper.deleteProConfigRichByConfigurationId(configurationId);
    }
}
